﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace BusinessModel
{
    /// <summary>
    /// * Unnormal Properties : ProductId1
    /// </summary>
    public class SaleOrderDetail : BaseModel
    {
        #region Primitive Properties
        public Nullable<global::System.Int32> SaleOrderId
        {
            get
            {
                return _SaleOrderId;
            }
            set
            {
                _SaleOrderId = value;
                OnPropertyChanged("SaleOrderId");
            }
        }
        private Nullable<global::System.Int32> _SaleOrderId;

        public Nullable<global::System.Int32> ProductId
        {
            get
            {
                return _ProductId;
            }
            set
            {
                if (_ProductId != value)
                {
                    _ProductId = value;
                    OnPropertyChanged("ProductId");
                }
            }
        }
        private Nullable<global::System.Int32> _ProductId;

        public Nullable<global::System.Int32> UnitId
        {
            get
            {
                return _UnitId;
            }
            set
            {
                _UnitId = value;
                OnPropertyChanged("UnitId");
            }
        }
        private Nullable<global::System.Int32> _UnitId;

        public Nullable<global::System.Int32> Quantity
        {
            get
            {
                return _Quantity;
            }
            set
            {
                _Quantity = value;
                OnPropertyChanged("Quantity");
            }
        }
        private Nullable<global::System.Int32> _Quantity;

        public Nullable<global::System.Int32> SalePriceUnit
        {
            get
            {
                return _SalePriceUnit;
            }
            set
            {
                _SalePriceUnit = value;
                OnPropertyChanged("SalePriceUnit");
            }
        }
        private Nullable<global::System.Int32> _SalePriceUnit;
        #endregion
        // Product.
        private Product _Product;
        public Product Product
        {
            get
            {
                if (_Product == null)
                {
                    _Product = new Product();
                }
                return _Product;
            }
            set { _Product = value; OnPropertyChanged("Product"); }
        }
        #region Extend Properties
        //ProductId1
        private int _ProductId1;
        public int ProductId1
        {
            get { return _ProductId1; }
            set
            {
                _ProductId = value;
                _ProductId1 = value;
                OnPropertyChanged("ProductId1");
            }
        }
        //UserName
        private string _UserName;
        public string UserName
        {
            get { return _UserName; }
            set
            {
                _UserName = value;
                OnPropertyChanged("UserName");
            }
        }
        //ProductCode
        private string _ProductCode;
        public string ProductCode
        {
            get { return _ProductCode; }
            set
            {
                _ProductCode = value;
                OnPropertyChanged("ProductCode");
            }
        }
        //ProductName
        private string _ProductName;
        public string ProductName
        {
            get { return _ProductName; }
            set
            {
                _ProductName = value;
                OnPropertyChanged("ProductName");
            }
        }
        //UnitName
        private string _UnitName;
        public string UnitName
        {
            get { return _UnitName; }
            set
            {
                _UnitName = value;
                OnPropertyChanged("UnitName");
            }
        }
        //Total
        private int _Total;
        public int Total
        {
            get { return _Total; }
            set
            {
                _Total = value;
                OnPropertyChanged("Total");
            }
        }
        #endregion Extend Properties
    }
}
